﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DTO;

namespace DAO
{
    public class PhieuBanHangDAO
    {
        public static string taoMaMoi()
        {
            string ma = MaTuDongDAO.layMA(LOAIMATUDONG.PHIEU_XUAT);

            using (var db = new bcsaleEntities())
            {
                int newID = db.PhieuBanHangs.Max(i => i.MaPBH) + 1;
                ma = ma + newID.ToString();
            }

            return ma;
        }
    }
}
